package com.mayuanfei.springaop.service.impl;

import com.mayuanfei.springaop.dao.UserXmlMapper;
import com.mayuanfei.springaop.service.UserServcie;

/**
 * 用户服务实现类
 *
 * @author 老马
 * @date 2023-03-01 11:10
 */
public class UserServiceXmlImpl implements UserServcie {
    private final UserXmlMapper userMapper;

    public UserServiceXmlImpl(UserXmlMapper userMapper) {
        this.userMapper = userMapper;
    }

    /**
     * 添加用户
     *
     * @param userId 用户id
     * @param userName 用户姓名
     * @return 用户id
     */
    public int addUser(int userId, String userName) {
        return this.userMapper.insertUser(userId, userName);
    }
}